﻿using System.ComponentModel;
using Microsoft.Windows.Design.Features;
using Microsoft.Windows.Design.Metadata;

namespace UpDownPhone.Design
{
    internal class UpDownControlMetadata : AttributeTableBuilder
    {
        public UpDownControlMetadata()
        {
            // Type attributes
            AddCustomAttributes(typeof(UpDownControl), new DescriptionAttribute("Represents a ranger vaues that can be between minimum and maximum value."));
            AddCustomAttributes(typeof(UpDownControl), new FeatureAttribute(typeof(UpDownControlInitializer)));

            // Property attributes
            AddCustomAttributes(typeof(UpDownControl), "Header", new TypeConverterAttribute(typeof(StringConverter)));
            AddCustomAttributes(typeof(UpDownControl), "Header", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "Header", new DescriptionAttribute("Gets or sets the header."));

            AddCustomAttributes(typeof(UpDownControl), "HeaderTemplate", new DescriptionAttribute("Gets or sets the template used to display the control's header."));

            AddCustomAttributes(typeof(UpDownControl), "ArrowColor", new DescriptionAttribute("Gets or sets the color arrows."));

            AddCustomAttributes(typeof(UpDownControl), "ArrowDisabledColor", new DescriptionAttribute("Gets or sets the color disabled arrows."));

            AddCustomAttributes(typeof(UpDownControl), "ArrowDirection", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(UpDownControl), "ArrowDirection", new DescriptionAttribute("Gets or sets the direction arrows : left/right , up/down or external."));

            AddCustomAttributes(typeof(UpDownControl), "GapArrow", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(UpDownControl), "GapArrow", new DescriptionAttribute("Gets or sets the distance between the arrows."));

            AddCustomAttributes(typeof(UpDownControl), "MinValue", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "MinValue", new DescriptionAttribute("Gets or sets the minimum value of ranger."));

            AddCustomAttributes(typeof(UpDownControl), "MaxValue", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "MaxValue", new DescriptionAttribute("Gets or sets the maximum value of ranger."));

            AddCustomAttributes(typeof(UpDownControl), "Value", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "Value", new DescriptionAttribute("Gets or sets the value selected."));

            AddCustomAttributes(typeof(UpDownControl), "SpeedHold", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(UpDownControl), "SpeedHold", new DescriptionAttribute("Gets or sets the speed change value when hold pressed action."));

            AddCustomAttributes(typeof(UpDownControl), "ExternalPathLeft", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(UpDownControl), "ExternalPathLeft", new DescriptionAttribute("Gets or sets the path geometric string for left/up action.Arrow Direction must be set to external."));

            AddCustomAttributes(typeof(UpDownControl), "ExternalPathRight", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(UpDownControl), "ExternalPathRight", new DescriptionAttribute("Gets or sets the path geometric string for left/up action.Arrow Direction must be set to external"));

            AddCustomAttributes(typeof(UpDownControl), "IncrementHoldStart", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(UpDownControl), "IncrementHoldStart", new DescriptionAttribute("Gets or sets the number of changes to switch for fast increment."));

            AddCustomAttributes(typeof(UpDownControl), "IncrementHold", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "IncrementHold", new DescriptionAttribute("Gets or sets the value to fast increment when hold pressed action."));

            AddCustomAttributes(typeof(UpDownControl), "Increment", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "Increment", new DescriptionAttribute("Gets or sets the value to increment when tap pressed action."));

            AddCustomAttributes(typeof(UpDownControl), "TextAfterValue", new CategoryAttribute(MetadataStore.CommonProperties));
            AddCustomAttributes(typeof(UpDownControl), "TextAfterValue", new DescriptionAttribute("Gets or sets the text after value."));

        }

    }
}
